# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=conmon
pkgver=2.1.10
pkgrel=0
pkgdesc="OCI container runtime monitor"
url="https://github.com/containers/conmon"
license="Apache-2.0"
arch="all"
makedepends="bash go-md2man glib-dev libseccomp-dev"
subpackages="$pkgname-doc"
source="https://github.com/containers/conmon/archive/v$pkgver/conmon-$pkgver.tar.gz"

prepare() {
	default_prepare

	# fix location of go-md2man
	sed -E "s/(GOMD2MAN =).*/\1 go-md2man/" -i docs/Makefile
}

build() {
	make
}

check() {
	./bin/conmon --version
}

package() {
	make install PREFIX=/usr DESTDIR="$pkgdir"
}

sha512sums="
ecf1a961f431b005b54faa68b5c1bcf31d448f994ca66a56f13002216074dba79b53b52a377d4f8dab08141d6c6cf44467352fbff37175135d3da84081b27a18  conmon-2.1.10.tar.gz
"
